home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscDirectory -- <one or two line summary>
- // Written by Simson L. Garfinkel <simsong@pleasant.cambridge.ma.us>
- // Extended and maintained by Georg Tuparev <tuparev@embl-heidelberg.de>
- // Copyright 1994 by Simson L. Garfinkel.
- // Version 0.5 beta. All rights reserved.
- // Last update: 11.12.1994.
- //
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "License.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #import <appkit/appkit.h>
- #import <sys/dir.h>
-
- @interface MiscDirectory:Object
- {
- List *fileNameList;
- int currentEntry;
- char *dirName;
- char *filetype; /* only return this file type */
- }
-
- + initialize;
-
- /* initialization and freeing */
- - initForDirectory:(const char *)dirname;
- - free;
- - setFileType:(const char *)filetype;
- - sortDir;
-
- /* information about current entry */
- - (const char *)entry;
- - (const char *)fullPathName;
- - (const char *)extension; /* return "" if no extension */
-
-
- /* movement */
- - (const char *)nextEntry; /* move to next entry */
- - rewind;
-
- /* information about directory */
- - (int)matchingEntries;
-
- /* Archiving */
- - read:(NXTypedStream *)stream;
- - write:(NXTypedStream *)stream;
-
- @end
-